Skip to content

Conversation

@jguz-pubnub
Copy link
Contributor

@jguz-pubnub jguz-pubnub commented Jan 26, 2026

feat: Add optional parameters to PNConfiguration.init

Add optional parameters to PNConfiguration.init, allowing developers to set subscribe_key, publish_key, and uuid during initialization

Closes #227

Add optional parameters to PNConfiguration.__init__ allowing developers
to set subscriber_key, publish_key, and uuid during initialization.
@pubnub-ops-terraform
Copy link

pubnub-ops-terraform commented Jan 26, 2026

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

@jguz-pubnub jguz-pubnub requested a review from parfeon January 26, 2026 14:17
def __init__(self):
def __init__(self,
subscribe_key: Optional[str] = None,
publish_key: Optional[str] = None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jguz-pubnub shouldn't only publish_key be optional? All non-publish endpoints require subscribe_key and we also made uuid required as well (we need to start migration to the userId).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It won't be backward compatible. So maybe for now we can have it, but should plan some migration and notification about deprecation.

@parfeon parfeon self-requested a review January 26, 2026 17:03
Copy link
Contributor

@parfeon parfeon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We maybe need to add a note that PNConfiguration constructor without parameters will be deprecated, but in general looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants